/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tida.servir.entities;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author indra
 */
@Embeddable
public class TipoSancionCausaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ID_TIPO_SANCION")
    private BigInteger idTipoSancion;
    @Basic(optional = false)
    @Column(name = "CAUSA_SANCION_ID")
    private BigInteger causaSancionId;

    public TipoSancionCausaPK() {
    }

    public TipoSancionCausaPK(BigInteger idTipoSancion, BigInteger causaSancionId) {
        this.idTipoSancion = idTipoSancion;
        this.causaSancionId = causaSancionId;
    }

    public BigInteger getIdTipoSancion() {
        return idTipoSancion;
    }

    public void setIdTipoSancion(BigInteger idTipoSancion) {
        this.idTipoSancion = idTipoSancion;
    }

    public BigInteger getCausaSancionId() {
        return causaSancionId;
    }

    public void setCausaSancionId(BigInteger causaSancionId) {
        this.causaSancionId = causaSancionId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTipoSancion != null ? idTipoSancion.hashCode() : 0);
        hash += (causaSancionId != null ? causaSancionId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TipoSancionCausaPK)) {
            return false;
        }
        TipoSancionCausaPK other = (TipoSancionCausaPK) object;
        if ((this.idTipoSancion == null && other.idTipoSancion != null) || (this.idTipoSancion != null && !this.idTipoSancion.equals(other.idTipoSancion))) {
            return false;
        }
        if ((this.causaSancionId == null && other.causaSancionId != null) || (this.causaSancionId != null && !this.causaSancionId.equals(other.causaSancionId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.tida.servir.entities.TipoSancionCausaPK[ idTipoSancion=" + idTipoSancion + ", causaSancionId=" + causaSancionId + " ]";
    }
    
}
